import re

if __name__ == '__main__':
    text = "This is some text show in **bold**. That is **content format in bold** too!"

    pattern = r"(\*{2}(?P<bold_text>.*?)\*{2})"

    result = re.sub(pattern=pattern, repl=r"<bold>\g<bold_text></bold>", string=text)
    print(result)